From 2f650b40d47f2d42739b55104164c56784754868 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Thu, 3 Apr 2008 02:50:27 +0000 Subject: [PATCH] Sparse fixes. 2008-04-02 Mukund Sivaraman Sparse fixes. * babl/babl-internal.h: fflush() takes pointer. * babl/babl-conversion.c: Don't mix code and declarations. * babl/babl-fish-reference.c: Fixed array assignment. svn path=/trunk/; revision=302 --- ChangeLog | 10 ++++++++++ babl/babl-conversion.c | 10 ++++++---- babl/babl-fish-reference.c | 2 +- babl/babl-internal.h | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c278ccb..6287e31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-04-02 Mukund Sivaraman + + Sparse fixes. + + * babl/babl-internal.h: fflush() takes pointer. + + * babl/babl-conversion.c: Don't mix code and declarations. + + * babl/babl-fish-reference.c: Fixed array assignment. + 2008-04-03 Øyvind Kolås Applied patch from Jan Heller that ports BablFishPath class to the new diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c index 461eee3..babca85 100644 --- a/babl/babl-conversion.c +++ b/babl/babl-conversion.c @@ -189,6 +189,8 @@ babl_conversion_new (void *first_arg, Babl *source; Babl *destination; + char *name; + va_start (varg, first_arg); source = (Babl *) arg; destination = va_arg (varg, Babl *); @@ -258,10 +260,10 @@ babl_conversion_new (void *first_arg, type = BABL_CONVERSION_PLANAR; } - char * name = create_name (source, destination, type); - + name = create_name (source, destination, type); + babl = babl_db_exist (db, id, name); - if (babl) + if (babl) { /* There is an instance already registered by the required id/name, * returning the preexistent one instead. @@ -277,7 +279,7 @@ babl_conversion_new (void *first_arg, babl_db_insert (db, babl); if (!source->type.from_list) source->type.from_list = babl_list_init_with_size (BABL_CONVERSIONS); - babl_list_insert_last (source->type.from_list, babl); + babl_list_insert_last (source->type.from_list, babl); return babl; } diff --git a/babl/babl-fish-reference.c b/babl/babl-fish-reference.c index beb5364..bf1bc80 100644 --- a/babl/babl-fish-reference.c +++ b/babl/babl-fish-reference.c @@ -170,7 +170,7 @@ convert_from_double (BablFormat *destination_fmt, dst_img->data[0] = destination_buf; dst_img->type[0] = (BablType *) babl_type_id (BABL_DOUBLE); dst_img->pitch[0] = destination_fmt->bytes_per_pixel; - dst_img->stride = 0; + dst_img->stride[0] = 0; for (i = 0; i < destination_fmt->components; i++) { diff --git a/babl/babl-internal.h b/babl/babl-internal.h index e9c4028..72d6a79 100644 --- a/babl/babl-internal.h +++ b/babl/babl-internal.h @@ -142,7 +142,7 @@ real_babl_log (const char *file, va_end (varg); fprintf (stdout, "\n"); - fflush (0); + fflush (NULL); return; hack_hack (); } -- 2.30.2